// 基本语法
function* generator() {
	yield 'hello'
	yield 'world'
	return "thanks"
}
const gen = generator()
console.log(gen); //Object [Generator] {}
// console.log(gen.next()); //{ value: 'hello', done: false }
// console.log(gen.next()); //{ value: 'world', done: false }
// console.log(gen.next()); //{ value: 'thanks', done: true }
// console.log(gen.next()); //{ value: undefined, done: true }
